package com.hzncc.flowable_diboot.contract.excel.model;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.diboot.file.excel.BaseExcelModel;
import com.diboot.file.excel.annotation.ExcelBindDict;
import com.diboot.file.excel.annotation.ExcelOption;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import java.io.PipedReader;


/**
* 字段映射 导入model定义
*
* @author MyName
* @version 1.0
* @date 2024-09-13
 * Copyright © MyCorp
*/
@Getter
@Setter
@ExcelIgnoreUnannotated
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 1)
public class FieldMappingImportModel extends BaseExcelModel {
    /**
    * 备注
    */
    @Length(max=100, message="备注长度应小于100")
    @ExcelProperty(value = "备注")
    private String remark;
    /**
    * 实体字段
    */
    @Length(max=300, message="实体字段长度应小于200")
    @ExcelProperty(value = "实体字段")
    private String entityField;
    /**
    * 字段路径
    */
    @Length(max=100, message="字段路径长度应小于100")
    @ExcelProperty(value = "字段路径")
    private String fieldPath;
    /**
    * 映射字段
    */
    @Length(max=100, message="映射字段长度应小于100")
    @ExcelProperty(value = "映射字段")
    private String mappingField;
    /**
    * 数据类型
    */
    @ExcelOption(dict = "mappingDataType")
    @ExcelBindDict(type = "mappingDataType")
    @ExcelProperty(value = "数据类型")
    private String dataType;
    /**
    * 编码
    */
    @Length(max=100, message="编码长度应小于100")
    @ExcelProperty(value = "编码")
    private String code;
    /**
    * 模板
    */
    @ExcelProperty(value = "模板")
    private String template;
    /**
    * 方法
    */
    @Length(max=300, message="方法长度应小于300")
    @ExcelProperty(value = "方法")
    private String method;

    /**
     * 版本
     */
    @Length(max=10, message="版本长度应小于10")
    @ExcelProperty(value = "版本")
    private String version;
}